;;; init-keybindings.el --- Keybindings for built-in keymaps -*- lexical-binding: t -*-
;;; Commentary:

;;; Code:
(require 'org)

;; Global keybindings ;;
(defmacro keymap-global-setq (&rest args)
  "Set global keybindings with ARGS.

Each element of ARGS is a cons with car and cdr as KEY and COMMAND of
`keymap-global-set', respectively."
  `(progn
     ,@(mapcar (lambda (a) `(keymap-global-set ,(car a) ,(cdr a)))
         args)))

(keymap-global-setq
  ;; Movement
  ("<mouse-8>" . #'switch-to-prev-buffer)
  ("<mouse-9>" . #'switch-to-next-buffer)

  ;; System clipboard
  ("C-S-z" . #'undo)
  ("C-S-y" . #'undo-redo)
  ("C-S-x" . #'clipboard-kill-region)
  ("C-S-c" . #'clipboard-kill-ring-save)
  ("C-S-v" . #'clipboard-yank)

  ;; Org Mode
  ("C-c o a" . #'org-agenda)
  ("C-c o c" . #'org-capture)
  ("C-c o l" . #'org-store-link))

(provide 'init-keybindings)
;;; init-keybindings.el ends here
